package com.qiuling.iot.service;

import com.qiuling.iot.entity.SysUser;
import com.qiuling.iot.vo.req.*;
import com.qiuling.iot.vo.resp.LoginRespVO;
import com.qiuling.iot.vo.resp.PageVO;
import com.qiuling.iot.vo.resp.UserOwnRoleRespVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 * @Author：zhangqiang
 * @Description：
 * @Date：Created in 17:13 2020/2/9
 * @Modified By：
 */
public interface UserService {

    /**
     * @description 用户登录方法
     * </br>
     * @param vo
     * @return com.qiuling.iot.vo.resp.LoginRespVO
     * @author zhangqiang
     * @date 20:08 2020/2/18
     */
    LoginRespVO login(LoginReqVO vo, HttpServletRequest request);

    /**
     * @param accessToken
     * @param refreshToken
     * @param request
     * @return void
     * @description 退出登录
     * </br>
     * @author zhangqiang
     * @date 19:07 2020/2/9
     */
    void logout(String accessToken, String refreshToken, HttpServletRequest request);

    PageVO<SysUser> pageInfo(UserPageReqVO vo);

    void addUser(UserAddReqVO vo);

    UserOwnRoleRespVO getUserOwnRole(String userId);

    void setUserOwnRole(UserOwnRoleReqVO vo);

    String refreshToken(String refreshToken);

    void updateUserInfo(UserUpdateReqVO vo, String operationId);

    void deletedUsers(List<String> list, String operationId);

    List<SysUser> selectUserInfoByDeptIds(List<String> deptIds);

    SysUser detailInfo(String userId);

    /**
     * @param vo
     * @param userId
     * @return void
     * @description 更新个人信息
     * </br>
     * @author zhangqiang
     * @date 17:18 2020/2/11
     */
    void userUpdateDetailInfo(UserUpdateDetailInfoReqVO vo, String userId);

    /**
     * @param vo
     * @param accessToken
     * @param refreshToken
     * @return void
     * @description 修改个人密码
     * </br>
     * @author zhangqiang
     * @date 17:19 2020/2/11
     */
    void userUpdatePwd(UserUpdatePwdReqVO vo, String accessToken, String refreshToken);
}
